<?php

class system extends CP_Controller {

    //put your code here
    function __construct() {
        parent::__construct('system', '', 'Id');
    }

    protected function beforecommit(){
        if(isset($_REQUEST['Params']['Value']))$_POST['Params']['Value'] = $_REQUEST['Params']['Value'];
    }

    function index() {
        $this->viewport('');
    }

    function viewport($type = '') {
        $this->assigns->items = $this->getRecordByType($type);
        echo $c = $this->load->view('cms/so/so_system/viewport', $this->assigns, true);
    }

    private function getRecordByType($type=''){
        $this->backend_model->db->where('Type',$type);
        return $this->backend_model->onGets();
    }

}

?>
